package edu.ubb.scp.model;

import java.lang.reflect.Field;

public class GameType implements Model {

	private int GameTypeID;
	private String GameTypeName;

	public GameType(String gameTypeName) {
		super();
		GameTypeName = gameTypeName;
	}

	public GameType() {

	}

	public int getGameTypeID() {
		return GameTypeID;
	}

	public void setGameTypeID(int gameTypeID) {
		GameTypeID = gameTypeID;
	}

	public String getGameTypeName() {
		return GameTypeName;
	}

	public void setGameTypeName(String gameTypeName) {
		GameTypeName = gameTypeName;
	}

	@Override
	public String toString() {
		return "GameType [GameTypeID=" + GameTypeID + ", GameTypeName="
				+ GameTypeName + "]";
	}

	@Override
	public Field getPrimaryKey() {
		try {
			return GameType.class.getDeclaredField("GameTypeID");
		} catch (NoSuchFieldException e) {
			e.printStackTrace();
		} catch (SecurityException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public Field[] getKeys() {
		return new Field[] { getPrimaryKey() };
	}
}
